package com.speedchina.common.redis.properties;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * 单节点redis配置类
 * @author Winter
 */
@Data
@Configuration
public class SingleProperties {
    @Value("${spring.redis.mode:single}")
    String mode;
    @Value("${spring.redis.keyPrefix:permission}")
    String keyPrefix;
    @Value("${spring.redis.host:}")
    String host;
    @Value("${spring.redis.port:6379}")
    int port;
    @Value("${spring.redis.password:}")
    String password;
    @Value("${spring.redis.database:12}")
    int database;
    @Value("${spring.redis.timeout:0}")
    long timeout;
    /**
     * jedisPool
     */
    @Value("${spring.redis.jedis.pool.max-active:8}")
    private Integer maxActive;
    @Value("${spring.redis.jedis.pool.max-idle:8}")
    private Integer maxIdle;
    @Value("${spring.redis.jedis.pool.max-wait:-1}")
    private Long maxWait;
    @Value("${spring.redis.jedis.pool.min-idle:0}")
    private Integer minIdle;
}
